<?php
namespace Mouta\AmistateBundle\Controller;

use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Validator\Constraints\EmailValidator;
use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;

class GeneralAdminController extends Controller
{
    public function GenerateSolrAction(){
        set_time_limit(0);
        $em = $this->getDoctrine()->getEntityManager();
        $usuarios = $em->getRepository('AmistateBundle:Usuario')->findAll();
        foreach($usuarios as $usuario){
            $this->get('amistate.user_manager')->actualizarUser($usuario);
        }
        die("Listo!!!");
    }
    
}
